package exception;

public class ThrowsDemo {
    public static void main(String[] args) {
        System.out.println("程序执行开始");
        try {
            Person p = new Person();
            p.setAge(345);
            System.out.println("此人的年龄是：" + p.getAge());
        }catch (Exception e){
            e.printStackTrace();
            System.out.println("程序出现了异常！");
        }
        System.out.println("程序执行结束！");
    }
}
